3.7.100 \(\int \frac {(c+d \sin (e+f x))^2}{a+b \sin (e+f x)} \, dx\) [700]
Optimal. Leaf size=93 \[ \frac {d (2 b c-a d) x}{b^2}+\frac {2 (b c-a d)^2 \tan ^{-1}\left (\frac {b+a \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {a^2-b^2}}\right )}{b^2 \sqrt {a^2-b^2} f}-\frac {d^2 \cos (e+f x)}{b f} \]
[Out]
d*(-a*d+2*b*c)*x/b^2-d^2*cos(f*x+e)/b/f+2*(-a*d+b*c)^2*arctan((b+a*tan(1/2*f*x+1/2*e))/(a^2-b^2)^(1/2))/b^2/f/
(a^2-b^2)^(1/2)
________________________________________________________________________________________
Rubi [A]
time = 0.13, antiderivative size = 93, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {2825, 2814,
2739, 632, 210} \begin {gather*} \frac {2 (b c-a d)^2 \text {ArcTan}\left (\frac {a \tan \left (\frac {1}{2} (e+f x)\right )+b}{\sqrt {a^2-b^2}}\right )}{b^2 f \sqrt {a^2-b^2}}+\frac {d x (2 b c-a d)}{b^2}-\frac {d^2 \cos (e+f x)}{b f} \end {gather*}
Antiderivative was successfully verified.
[In]
Int[(c + d*Sin[e + f*x])^2/(a + b*Sin[e + f*x]),x]
[Out]
(d*(2*b*c - a*d)*x)/b^2 + (2*(b*c - a*d)^2*ArcTan[(b + a*Tan[(e + f*x)/2])/Sqrt[a^2 - b^2]])/(b^2*Sqrt[a^2 - b
^2]*f) - (d^2*Cos[e + f*x])/(b*f)
Rule 210
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^(-1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])
], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])
Rule 632
Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]
Rule 2739
Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x]}, Dis
t[2*(e/d), Subst[Int[1/(a + 2*b*e*x + a*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] &&
NeQ[a^2 - b^2, 0]
Rule 2814
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[b*(x/d)
, x] - Dist[(b*c - a*d)/d, Int[1/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d
, 0]
Rule 2825
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^2/((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-b^2
)*(Cos[e + f*x]/(d*f)), x] + Dist[1/d, Int[Simp[a^2*d - b*(b*c - 2*a*d)*Sin[e + f*x], x]/(c + d*Sin[e + f*x]),
x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Rubi steps
\begin {align*} \int \frac {(c+d \sin (e+f x))^2}{a+b \sin (e+f x)} \, dx &=-\frac {d^2 \cos (e+f x)}{b f}+\frac {\int \frac {b c^2+d (2 b c-a d) \sin (e+f x)}{a+b \sin (e+f x)} \, dx}{b}\\ &=\frac {d (2 b c-a d) x}{b^2}-\frac {d^2 \cos (e+f x)}{b f}+\frac {(b c-a d)^2 \int \frac {1}{a+b \sin (e+f x)} \, dx}{b^2}\\ &=\frac {d (2 b c-a d) x}{b^2}-\frac {d^2 \cos (e+f x)}{b f}+\frac {\left (2 (b c-a d)^2\right ) \text {Subst}\left (\int \frac {1}{a+2 b x+a x^2} \, dx,x,\tan \left (\frac {1}{2} (e+f x)\right )\right )}{b^2 f}\\ &=\frac {d (2 b c-a d) x}{b^2}-\frac {d^2 \cos (e+f x)}{b f}-\frac {\left (4 (b c-a d)^2\right ) \text {Subst}\left (\int \frac {1}{-4 \left (a^2-b^2\right )-x^2} \, dx,x,2 b+2 a \tan \left (\frac {1}{2} (e+f x)\right )\right )}{b^2 f}\\ &=\frac {d (2 b c-a d) x}{b^2}+\frac {2 (b c-a d)^2 \tan ^{-1}\left (\frac {b+a \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {a^2-b^2}}\right )}{b^2 \sqrt {a^2-b^2} f}-\frac {d^2 \cos (e+f x)}{b f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.18, size = 90, normalized size = 0.97 \begin {gather*} \frac {d (2 b c-a d) (e+f x)+\frac {2 (b c-a d)^2 \tan ^{-1}\left (\frac {b+a \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}-b d^2 \cos (e+f x)}{b^2 f} \end {gather*}
Antiderivative was successfully verified.
[In]
Integrate[(c + d*Sin[e + f*x])^2/(a + b*Sin[e + f*x]),x]
[Out]
(d*(2*b*c - a*d)*(e + f*x) + (2*(b*c - a*d)^2*ArcTan[(b + a*Tan[(e + f*x)/2])/Sqrt[a^2 - b^2]])/Sqrt[a^2 - b^2
] - b*d^2*Cos[e + f*x])/(b^2*f)
________________________________________________________________________________________
Maple [A]
time = 0.20, size = 117, normalized size = 1.26
| | |
method |
result |
size |
| | |
derivativedivides |
\(\frac {-\frac {2 d \left (\frac {b d}{1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )}+\left (a d -2 b c \right ) \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )\right )}{b^{2}}+\frac {2 \left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right ) \arctan \left (\frac {2 a \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{b^{2} \sqrt {a^{2}-b^{2}}}}{f}\) |
\(117\) |
default |
\(\frac {-\frac {2 d \left (\frac {b d}{1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )}+\left (a d -2 b c \right ) \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )\right )}{b^{2}}+\frac {2 \left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right ) \arctan \left (\frac {2 a \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{b^{2} \sqrt {a^{2}-b^{2}}}}{f}\) |
\(117\) |
risch |
\(-\frac {d^{2} x a}{b^{2}}+\frac {2 d x c}{b}-\frac {d^{2} {\mathrm e}^{i \left (f x +e \right )}}{2 b f}-\frac {d^{2} {\mathrm e}^{-i \left (f x +e \right )}}{2 b f}-\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i \sqrt {-a^{2}+b^{2}}\, a -a^{2}+b^{2}}{\sqrt {-a^{2}+b^{2}}\, b}\right ) a^{2} d^{2}}{\sqrt {-a^{2}+b^{2}}\, f \,b^{2}}+\frac {2 \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i \sqrt {-a^{2}+b^{2}}\, a -a^{2}+b^{2}}{\sqrt {-a^{2}+b^{2}}\, b}\right ) a c d}{\sqrt {-a^{2}+b^{2}}\, f b}-\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i \sqrt {-a^{2}+b^{2}}\, a -a^{2}+b^{2}}{\sqrt {-a^{2}+b^{2}}\, b}\right ) c^{2}}{\sqrt {-a^{2}+b^{2}}\, f}+\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i \sqrt {-a^{2}+b^{2}}\, a +a^{2}-b^{2}}{\sqrt {-a^{2}+b^{2}}\, b}\right ) a^{2} d^{2}}{\sqrt {-a^{2}+b^{2}}\, f \,b^{2}}-\frac {2 \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i \sqrt {-a^{2}+b^{2}}\, a +a^{2}-b^{2}}{\sqrt {-a^{2}+b^{2}}\, b}\right ) a c d}{\sqrt {-a^{2}+b^{2}}\, f b}+\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i \sqrt {-a^{2}+b^{2}}\, a +a^{2}-b^{2}}{\sqrt {-a^{2}+b^{2}}\, b}\right ) c^{2}}{\sqrt {-a^{2}+b^{2}}\, f}\) |
\(490\) |
| | |
|
|
|
Verification of antiderivative is not currently implemented for this CAS.
[In]
int((c+d*sin(f*x+e))^2/(a+b*sin(f*x+e)),x,method=_RETURNVERBOSE)
[Out]
1/f*(-2*d/b^2*(b*d/(1+tan(1/2*f*x+1/2*e)^2)+(a*d-2*b*c)*arctan(tan(1/2*f*x+1/2*e)))+2*(a^2*d^2-2*a*b*c*d+b^2*c
^2)/b^2/(a^2-b^2)^(1/2)*arctan(1/2*(2*a*tan(1/2*f*x+1/2*e)+2*b)/(a^2-b^2)^(1/2)))
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((c+d*sin(f*x+e))^2/(a+b*sin(f*x+e)),x, algorithm="maxima")
[Out]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?`
for more de
________________________________________________________________________________________
Fricas [A]
time = 0.38, size = 379, normalized size = 4.08 \begin {gather*} \left [-\frac {2 \, {\left (a^{2} b - b^{3}\right )} d^{2} \cos \left (f x + e\right ) - 2 \, {\left (2 \, {\left (a^{2} b - b^{3}\right )} c d - {\left (a^{3} - a b^{2}\right )} d^{2}\right )} f x + {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \sqrt {-a^{2} + b^{2}} \log \left (\frac {{\left (2 \, a^{2} - b^{2}\right )} \cos \left (f x + e\right )^{2} - 2 \, a b \sin \left (f x + e\right ) - a^{2} - b^{2} + 2 \, {\left (a \cos \left (f x + e\right ) \sin \left (f x + e\right ) + b \cos \left (f x + e\right )\right )} \sqrt {-a^{2} + b^{2}}}{b^{2} \cos \left (f x + e\right )^{2} - 2 \, a b \sin \left (f x + e\right ) - a^{2} - b^{2}}\right )}{2 \, {\left (a^{2} b^{2} - b^{4}\right )} f}, -\frac {{\left (a^{2} b - b^{3}\right )} d^{2} \cos \left (f x + e\right ) - {\left (2 \, {\left (a^{2} b - b^{3}\right )} c d - {\left (a^{3} - a b^{2}\right )} d^{2}\right )} f x + {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \sqrt {a^{2} - b^{2}} \arctan \left (-\frac {a \sin \left (f x + e\right ) + b}{\sqrt {a^{2} - b^{2}} \cos \left (f x + e\right )}\right )}{{\left (a^{2} b^{2} - b^{4}\right )} f}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((c+d*sin(f*x+e))^2/(a+b*sin(f*x+e)),x, algorithm="fricas")
[Out]
[-1/2*(2*(a^2*b - b^3)*d^2*cos(f*x + e) - 2*(2*(a^2*b - b^3)*c*d - (a^3 - a*b^2)*d^2)*f*x + (b^2*c^2 - 2*a*b*c
*d + a^2*d^2)*sqrt(-a^2 + b^2)*log(((2*a^2 - b^2)*cos(f*x + e)^2 - 2*a*b*sin(f*x + e) - a^2 - b^2 + 2*(a*cos(f
*x + e)*sin(f*x + e) + b*cos(f*x + e))*sqrt(-a^2 + b^2))/(b^2*cos(f*x + e)^2 - 2*a*b*sin(f*x + e) - a^2 - b^2)
))/((a^2*b^2 - b^4)*f), -((a^2*b - b^3)*d^2*cos(f*x + e) - (2*(a^2*b - b^3)*c*d - (a^3 - a*b^2)*d^2)*f*x + (b^
2*c^2 - 2*a*b*c*d + a^2*d^2)*sqrt(a^2 - b^2)*arctan(-(a*sin(f*x + e) + b)/(sqrt(a^2 - b^2)*cos(f*x + e))))/((a
^2*b^2 - b^4)*f)]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 4032 vs.
\(2 (78) = 156\).
time = 186.31, size = 4032, normalized size = 43.35 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((c+d*sin(f*x+e))**2/(a+b*sin(f*x+e)),x)
[Out]
Piecewise((zoo*x*(c + d*sin(e))**2/sin(e), Eq(a, 0) & Eq(b, 0) & Eq(f, 0)), (2*b**2*c*d*f*x*tan(e/2 + f*x/2)**
3/(b**3*f*tan(e/2 + f*x/2)**3 + b**3*f*tan(e/2 + f*x/2) - f*(b**2)**(3/2)*tan(e/2 + f*x/2)**2 - f*(b**2)**(3/2
)) + 2*b**2*c*d*f*x*tan(e/2 + f*x/2)/(b**3*f*tan(e/2 + f*x/2)**3 + b**3*f*tan(e/2 + f*x/2) - f*(b**2)**(3/2)*t
an(e/2 + f*x/2)**2 - f*(b**2)**(3/2)) + 4*b**2*c*d*tan(e/2 + f*x/2)**2/(b**3*f*tan(e/2 + f*x/2)**3 + b**3*f*ta
n(e/2 + f*x/2) - f*(b**2)**(3/2)*tan(e/2 + f*x/2)**2 - f*(b**2)**(3/2)) + 4*b**2*c*d/(b**3*f*tan(e/2 + f*x/2)*
*3 + b**3*f*tan(e/2 + f*x/2) - f*(b**2)**(3/2)*tan(e/2 + f*x/2)**2 - f*(b**2)**(3/2)) - b**2*d**2*f*x*tan(e/2
+ f*x/2)**2/(b**3*f*tan(e/2 + f*x/2)**3 + b**3*f*tan(e/2 + f*x/2) - f*(b**2)**(3/2)*tan(e/2 + f*x/2)**2 - f*(b
**2)**(3/2)) - b**2*d**2*f*x/(b**3*f*tan(e/2 + f*x/2)**3 + b**3*f*tan(e/2 + f*x/2) - f*(b**2)**(3/2)*tan(e/2 +
f*x/2)**2 - f*(b**2)**(3/2)) - 2*b**2*d**2*tan(e/2 + f*x/2)/(b**3*f*tan(e/2 + f*x/2)**3 + b**3*f*tan(e/2 + f*
x/2) - f*(b**2)**(3/2)*tan(e/2 + f*x/2)**2 - f*(b**2)**(3/2)) + 2*b*c**2*sqrt(b**2)*tan(e/2 + f*x/2)**2/(b**3*
f*tan(e/2 + f*x/2)**3 + b**3*f*tan(e/2 + f*x/2) - f*(b**2)**(3/2)*tan(e/2 + f*x/2)**2 - f*(b**2)**(3/2)) + 2*b
*c**2*sqrt(b**2)/(b**3*f*tan(e/2 + f*x/2)**3 + b**3*f*tan(e/2 + f*x/2) - f*(b**2)**(3/2)*tan(e/2 + f*x/2)**2 -
f*(b**2)**(3/2)) - 2*b*c*d*f*x*sqrt(b**2)*tan(e/2 + f*x/2)**2/(b**3*f*tan(e/2 + f*x/2)**3 + b**3*f*tan(e/2 +
f*x/2) - f*(b**2)**(3/2)*tan(e/2 + f*x/2)**2 - f*(b**2)**(3/2)) - 2*b*c*d*f*x*sqrt(b**2)/(b**3*f*tan(e/2 + f*x
/2)**3 + b**3*f*tan(e/2 + f*x/2) - f*(b**2)**(3/2)*tan(e/2 + f*x/2)**2 - f*(b**2)**(3/2)) + b*d**2*f*x*sqrt(b*
*2)*tan(e/2 + f*x/2)**3/(b**3*f*tan(e/2 + f*x/2)**3 + b**3*f*tan(e/2 + f*x/2) - f*(b**2)**(3/2)*tan(e/2 + f*x/
2)**2 - f*(b**2)**(3/2)) + b*d**2*f*x*sqrt(b**2)*tan(e/2 + f*x/2)/(b**3*f*tan(e/2 + f*x/2)**3 + b**3*f*tan(e/2
+ f*x/2) - f*(b**2)**(3/2)*tan(e/2 + f*x/2)**2 - f*(b**2)**(3/2)) + 2*b*d**2*sqrt(b**2)*tan(e/2 + f*x/2)**2/(
b**3*f*tan(e/2 + f*x/2)**3 + b**3*f*tan(e/2 + f*x/2) - f*(b**2)**(3/2)*tan(e/2 + f*x/2)**2 - f*(b**2)**(3/2))
+ 4*b*d**2*sqrt(b**2)/(b**3*f*tan(e/2 + f*x/2)**3 + b**3*f*tan(e/2 + f*x/2) - f*(b**2)**(3/2)*tan(e/2 + f*x/2)
**2 - f*(b**2)**(3/2)), Eq(a, -sqrt(b**2))), (2*b**2*c*d*f*x*tan(e/2 + f*x/2)**3/(b**3*f*tan(e/2 + f*x/2)**3 +
b**3*f*tan(e/2 + f*x/2) + f*(b**2)**(3/2)*tan(e/2 + f*x/2)**2 + f*(b**2)**(3/2)) + 2*b**2*c*d*f*x*tan(e/2 + f
*x/2)/(b**3*f*tan(e/2 + f*x/2)**3 + b**3*f*tan(e/2 + f*x/2) + f*(b**2)**(3/2)*tan(e/2 + f*x/2)**2 + f*(b**2)**
(3/2)) + 4*b**2*c*d*tan(e/2 + f*x/2)**2/(b**3*f*tan(e/2 + f*x/2)**3 + b**3*f*tan(e/2 + f*x/2) + f*(b**2)**(3/2
)*tan(e/2 + f*x/2)**2 + f*(b**2)**(3/2)) + 4*b**2*c*d/(b**3*f*tan(e/2 + f*x/2)**3 + b**3*f*tan(e/2 + f*x/2) +
f*(b**2)**(3/2)*tan(e/2 + f*x/2)**2 + f*(b**2)**(3/2)) - b**2*d**2*f*x*tan(e/2 + f*x/2)**2/(b**3*f*tan(e/2 + f
*x/2)**3 + b**3*f*tan(e/2 + f*x/2) + f*(b**2)**(3/2)*tan(e/2 + f*x/2)**2 + f*(b**2)**(3/2)) - b**2*d**2*f*x/(b
**3*f*tan(e/2 + f*x/2)**3 + b**3*f*tan(e/2 + f*x/2) + f*(b**2)**(3/2)*tan(e/2 + f*x/2)**2 + f*(b**2)**(3/2)) -
2*b**2*d**2*tan(e/2 + f*x/2)/(b**3*f*tan(e/2 + f*x/2)**3 + b**3*f*tan(e/2 + f*x/2) + f*(b**2)**(3/2)*tan(e/2
+ f*x/2)**2 + f*(b**2)**(3/2)) - 2*b*c**2*sqrt(b**2)*tan(e/2 + f*x/2)**2/(b**3*f*tan(e/2 + f*x/2)**3 + b**3*f*
tan(e/2 + f*x/2) + f*(b**2)**(3/2)*tan(e/2 + f*x/2)**2 + f*(b**2)**(3/2)) - 2*b*c**2*sqrt(b**2)/(b**3*f*tan(e/
2 + f*x/2)**3 + b**3*f*tan(e/2 + f*x/2) + f*(b**2)**(3/2)*tan(e/2 + f*x/2)**2 + f*(b**2)**(3/2)) + 2*b*c*d*f*x
*sqrt(b**2)*tan(e/2 + f*x/2)**2/(b**3*f*tan(e/2 + f*x/2)**3 + b**3*f*tan(e/2 + f*x/2) + f*(b**2)**(3/2)*tan(e/
2 + f*x/2)**2 + f*(b**2)**(3/2)) + 2*b*c*d*f*x*sqrt(b**2)/(b**3*f*tan(e/2 + f*x/2)**3 + b**3*f*tan(e/2 + f*x/2
) + f*(b**2)**(3/2)*tan(e/2 + f*x/2)**2 + f*(b**2)**(3/2)) - b*d**2*f*x*sqrt(b**2)*tan(e/2 + f*x/2)**3/(b**3*f
*tan(e/2 + f*x/2)**3 + b**3*f*tan(e/2 + f*x/2) + f*(b**2)**(3/2)*tan(e/2 + f*x/2)**2 + f*(b**2)**(3/2)) - b*d*
*2*f*x*sqrt(b**2)*tan(e/2 + f*x/2)/(b**3*f*tan(e/2 + f*x/2)**3 + b**3*f*tan(e/2 + f*x/2) + f*(b**2)**(3/2)*tan
(e/2 + f*x/2)**2 + f*(b**2)**(3/2)) - 2*b*d**2*sqrt(b**2)*tan(e/2 + f*x/2)**2/(b**3*f*tan(e/2 + f*x/2)**3 + b*
*3*f*tan(e/2 + f*x/2) + f*(b**2)**(3/2)*tan(e/2 + f*x/2)**2 + f*(b**2)**(3/2)) - 4*b*d**2*sqrt(b**2)/(b**3*f*t
an(e/2 + f*x/2)**3 + b**3*f*tan(e/2 + f*x/2) + f*(b**2)**(3/2)*tan(e/2 + f*x/2)**2 + f*(b**2)**(3/2)), Eq(a, s
qrt(b**2))), ((c**2*x - 2*c*d*cos(e + f*x)/f + d**2*x*sin(e + f*x)**2/2 + d**2*x*cos(e + f*x)**2/2 - d**2*sin(
e + f*x)*cos(e + f*x)/(2*f))/a, Eq(b, 0)), (x*(c + d*sin(e))**2/(a + b*sin(e)), Eq(f, 0)), ((c**2*log(tan(e/2
+ f*x/2))*tan(e/2 + f*x/2)**2/(f*tan(e/2 + f*x/2)**2 + f) + c**2*log(tan(e/2 + f*x/2))/(f*tan(e/2 + f*x/2)**2
+ f) + 2*c*d*f*x*tan(e/2 + f*x/2)**2/(f*tan(e/2 + f*x/2)**2 + f) + 2*c*d*f*x/(f*tan(e/2 + f*x/2)**2 + f) - 2*d
**2/(f*tan(e/2 + f*x/2)**2 + f))/b, Eq(a, 0)), (a**2*d**2*log(tan(e/2 + f*x/2) + b/a - sqrt(-a**2 + b**2)/a)*t
an(e/2 + f*x/2)**2/(b**2*f*sqrt(-a**2 + b**2)*t...
________________________________________________________________________________________
Giac [A]
time = 0.46, size = 134, normalized size = 1.44 \begin {gather*} \frac {\frac {{\left (2 \, b c d - a d^{2}\right )} {\left (f x + e\right )}}{b^{2}} - \frac {2 \, d^{2}}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 1\right )} b} + \frac {2 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} {\left (\pi \left \lfloor \frac {f x + e}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (a\right ) + \arctan \left (\frac {a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + b}{\sqrt {a^{2} - b^{2}}}\right )\right )}}{\sqrt {a^{2} - b^{2}} b^{2}}}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((c+d*sin(f*x+e))^2/(a+b*sin(f*x+e)),x, algorithm="giac")
[Out]
((2*b*c*d - a*d^2)*(f*x + e)/b^2 - 2*d^2/((tan(1/2*f*x + 1/2*e)^2 + 1)*b) + 2*(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*
(pi*floor(1/2*(f*x + e)/pi + 1/2)*sgn(a) + arctan((a*tan(1/2*f*x + 1/2*e) + b)/sqrt(a^2 - b^2)))/(sqrt(a^2 - b
^2)*b^2))/f
________________________________________________________________________________________
Mupad [B]
time = 12.62, size = 2628, normalized size = 28.26 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
int((c + d*sin(e + f*x))^2/(a + b*sin(e + f*x)),x)
[Out]
- (2*d^2)/(b*f*(tan(e/2 + (f*x)/2)^2 + 1)) - (atan((((-(a + b)*(a - b))^(1/2)*(a*d - b*c)^2*((32*(a^4*b*d^4 -
4*a^3*b^2*c*d^3 + 4*a^2*b^3*c^2*d^2))/b^2 - (32*tan(e/2 + (f*x)/2)*(a*b^5*c^4 + 2*a^5*b*d^4 - 2*a^3*b^3*d^4 -
8*a*b^5*c^2*d^2 + 8*a^2*b^4*c*d^3 - 4*a^2*b^4*c^3*d - 8*a^4*b^2*c*d^3 + 10*a^3*b^3*c^2*d^2))/b^3 + ((-(a + b)*
(a - b))^(1/2)*(a*d - b*c)^2*((32*(a^2*b^4*c^2 + a^2*b^4*d^2 - 2*a*b^5*c*d))/b^2 + (32*tan(e/2 + (f*x)/2)*(2*a
*b^6*c^2 + 2*a^3*b^4*d^2 - 4*a^2*b^5*c*d))/b^3 + ((-(a + b)*(a - b))^(1/2)*(a*d - b*c)^2*(32*a^2*b^3 + (32*tan
(e/2 + (f*x)/2)*(3*a*b^7 - 2*a^3*b^5))/b^3))/(b^4 - a^2*b^2)))/(b^4 - a^2*b^2))*1i)/(b^4 - a^2*b^2) - ((-(a +
b)*(a - b))^(1/2)*(a*d - b*c)^2*((32*tan(e/2 + (f*x)/2)*(a*b^5*c^4 + 2*a^5*b*d^4 - 2*a^3*b^3*d^4 - 8*a*b^5*c^2
*d^2 + 8*a^2*b^4*c*d^3 - 4*a^2*b^4*c^3*d - 8*a^4*b^2*c*d^3 + 10*a^3*b^3*c^2*d^2))/b^3 - (32*(a^4*b*d^4 - 4*a^3
*b^2*c*d^3 + 4*a^2*b^3*c^2*d^2))/b^2 + ((-(a + b)*(a - b))^(1/2)*(a*d - b*c)^2*((32*(a^2*b^4*c^2 + a^2*b^4*d^2
- 2*a*b^5*c*d))/b^2 + (32*tan(e/2 + (f*x)/2)*(2*a*b^6*c^2 + 2*a^3*b^4*d^2 - 4*a^2*b^5*c*d))/b^3 - ((-(a + b)*
(a - b))^(1/2)*(a*d - b*c)^2*(32*a^2*b^3 + (32*tan(e/2 + (f*x)/2)*(3*a*b^7 - 2*a^3*b^5))/b^3))/(b^4 - a^2*b^2)
))/(b^4 - a^2*b^2))*1i)/(b^4 - a^2*b^2))/((64*tan(e/2 + (f*x)/2)*(2*a^5*d^6 + 8*a*b^4*c^4*d^2 - 24*a^2*b^3*c^3
*d^3 + 26*a^3*b^2*c^2*d^4 - 12*a^4*b*c*d^5))/b^3 - (64*(a^4*c^2*d^4 - 4*a^3*b*c^3*d^3 + 5*a^2*b^2*c^4*d^2 - 2*
a*b^3*c^5*d))/b^2 + ((-(a + b)*(a - b))^(1/2)*(a*d - b*c)^2*((32*(a^4*b*d^4 - 4*a^3*b^2*c*d^3 + 4*a^2*b^3*c^2*
d^2))/b^2 - (32*tan(e/2 + (f*x)/2)*(a*b^5*c^4 + 2*a^5*b*d^4 - 2*a^3*b^3*d^4 - 8*a*b^5*c^2*d^2 + 8*a^2*b^4*c*d^
3 - 4*a^2*b^4*c^3*d - 8*a^4*b^2*c*d^3 + 10*a^3*b^3*c^2*d^2))/b^3 + ((-(a + b)*(a - b))^(1/2)*(a*d - b*c)^2*((3
2*(a^2*b^4*c^2 + a^2*b^4*d^2 - 2*a*b^5*c*d))/b^2 + (32*tan(e/2 + (f*x)/2)*(2*a*b^6*c^2 + 2*a^3*b^4*d^2 - 4*a^2
*b^5*c*d))/b^3 + ((-(a + b)*(a - b))^(1/2)*(a*d - b*c)^2*(32*a^2*b^3 + (32*tan(e/2 + (f*x)/2)*(3*a*b^7 - 2*a^3
*b^5))/b^3))/(b^4 - a^2*b^2)))/(b^4 - a^2*b^2)))/(b^4 - a^2*b^2) + ((-(a + b)*(a - b))^(1/2)*(a*d - b*c)^2*((3
2*tan(e/2 + (f*x)/2)*(a*b^5*c^4 + 2*a^5*b*d^4 - 2*a^3*b^3*d^4 - 8*a*b^5*c^2*d^2 + 8*a^2*b^4*c*d^3 - 4*a^2*b^4*
c^3*d - 8*a^4*b^2*c*d^3 + 10*a^3*b^3*c^2*d^2))/b^3 - (32*(a^4*b*d^4 - 4*a^3*b^2*c*d^3 + 4*a^2*b^3*c^2*d^2))/b^
2 + ((-(a + b)*(a - b))^(1/2)*(a*d - b*c)^2*((32*(a^2*b^4*c^2 + a^2*b^4*d^2 - 2*a*b^5*c*d))/b^2 + (32*tan(e/2
+ (f*x)/2)*(2*a*b^6*c^2 + 2*a^3*b^4*d^2 - 4*a^2*b^5*c*d))/b^3 - ((-(a + b)*(a - b))^(1/2)*(a*d - b*c)^2*(32*a^
2*b^3 + (32*tan(e/2 + (f*x)/2)*(3*a*b^7 - 2*a^3*b^5))/b^3))/(b^4 - a^2*b^2)))/(b^4 - a^2*b^2)))/(b^4 - a^2*b^2
)))*(-(a + b)*(a - b))^(1/2)*(a*d - b*c)^2*2i)/(f*(b^4 - a^2*b^2)) - (2*d*atan((64*a^4*d^6*tan(e/2 + (f*x)/2))
/(64*a^4*d^6 + 128*a^4*c^2*d^4 - 512*a*b^3*c^3*d^3 - 512*a^3*b*c^3*d^3 + 768*a^2*b^2*c^2*d^4 + 576*a^2*b^2*c^4
*d^2 - 128*a*b^3*c^5*d - 384*a^3*b*c*d^5) + (384*a^3*c*d^5*tan(e/2 + (f*x)/2))/(384*a^3*c*d^5 - (64*a^4*d^6)/b
+ 512*a^3*c^3*d^3 + 512*a*b^2*c^3*d^3 - 768*a^2*b*c^2*d^4 - 576*a^2*b*c^4*d^2 - (128*a^4*c^2*d^4)/b + 128*a*b
^2*c^5*d) + (768*a^2*c^2*d^4*tan(e/2 + (f*x)/2))/((64*a^4*d^6)/b^2 + 768*a^2*c^2*d^4 + 576*a^2*c^4*d^2 - (384*
a^3*c*d^5)/b - 128*a*b*c^5*d - (512*a^3*c^3*d^3)/b + (128*a^4*c^2*d^4)/b^2 - 512*a*b*c^3*d^3) + (576*a^2*c^4*d
^2*tan(e/2 + (f*x)/2))/((64*a^4*d^6)/b^2 + 768*a^2*c^2*d^4 + 576*a^2*c^4*d^2 - (384*a^3*c*d^5)/b - 128*a*b*c^5
*d - (512*a^3*c^3*d^3)/b + (128*a^4*c^2*d^4)/b^2 - 512*a*b*c^3*d^3) + (512*a^3*c^3*d^3*tan(e/2 + (f*x)/2))/(38
4*a^3*c*d^5 - (64*a^4*d^6)/b + 512*a^3*c^3*d^3 + 512*a*b^2*c^3*d^3 - 768*a^2*b*c^2*d^4 - 576*a^2*b*c^4*d^2 - (
128*a^4*c^2*d^4)/b + 128*a*b^2*c^5*d) + (128*a^4*c^2*d^4*tan(e/2 + (f*x)/2))/(64*a^4*d^6 + 128*a^4*c^2*d^4 - 5
12*a*b^3*c^3*d^3 - 512*a^3*b*c^3*d^3 + 768*a^2*b^2*c^2*d^4 + 576*a^2*b^2*c^4*d^2 - 128*a*b^3*c^5*d - 384*a^3*b
*c*d^5) - (128*a*b*c^5*d*tan(e/2 + (f*x)/2))/((64*a^4*d^6)/b^2 + 768*a^2*c^2*d^4 + 576*a^2*c^4*d^2 - (384*a^3*
c*d^5)/b - 128*a*b*c^5*d - (512*a^3*c^3*d^3)/b + (128*a^4*c^2*d^4)/b^2 - 512*a*b*c^3*d^3) - (512*a*b*c^3*d^3*t
an(e/2 + (f*x)/2))/((64*a^4*d^6)/b^2 + 768*a^2*c^2*d^4 + 576*a^2*c^4*d^2 - (384*a^3*c*d^5)/b - 128*a*b*c^5*d -
(512*a^3*c^3*d^3)/b + (128*a^4*c^2*d^4)/b^2 - 512*a*b*c^3*d^3))*(a*d - 2*b*c))/(b^2*f)
________________________________________________________________________________________